#pragma once
#include<vector>
#include"XFtpServerCMD.h"
class XThread;
class Xtask;
class XThreadPool
{
public:
	static XThreadPool* Get() {
		static XThreadPool p;
		return &p;
	}
	void dispatch(XFtpServerCMD* task);
	void Init(int threadCount);
private:
	int threadCount = 0;
	int lastThread = -1;
	std::vector<XThread*>threads;
	XThreadPool() {}

};

